<script type="text/javascript">
    $.fn.dataGridOptions.formSubFun("#form",'/modules/account/recharge/offlinebank/offlinebankAdd.html'); //表单提交  参数1：表单id 参数2：表单action地址		
$('input[forbidspace="true"]').keyup(function(e) {
   if(e.which == 32) {
	   return false;
   }
});
    $('input[onlynumber="true"]').keypress(function(e) {
	// 需要排除在firefox下某些按键不起作用的异常
	if(e.which && e.which != 8 && !(e.which >= 48 && e.which <= 57)) {
	   return false;
	}
});	
$('input[type="text"]').each(function() {
    if($.browser.msie) {
    	var changeFlag;
        this.onpropertychange = function() {
        	if (changeFlag) {
        		return false;
        	}
        	changeFlag = true;
			if($(this).attr('forbidspace') == 'true') {
				this.value = this.value.replace(/\s/g,'');
			}else if($(this).attr('onlynumber') == 'true') {
				this.value = this.value.replace(/\D/g,'');
			}else if($(this).attr('numberpoint') == 'true') {
				this.value = this.value.replace(/[^.\d]/g,'');
			}
			changeFlag = false;	
		};
    }else {
        this.addEventListener('input', function() {
            if($(this).attr('forbidspace') == 'true' && !$.browser.webkit) {
                this.value = this.value.replace(/\s/g,'');
            }else if($(this).attr('onlynumber') == 'true') {
                this.value = this.value.replace(/\D/g,'');
            }else if($(this).attr('numberpoint') == 'true') {
                this.value = this.value.replace(/[^.\d]/g,'');
            }
        }, false);
    }
});
</script>
<div class="popForm">
    <form id="form"  method="post">
    	<div class="formitm">
		     <label class="lab">账户拥有者：</label>
		     <div class="ipt">
		     	<input type="text" name="owner" class="w400 easyui-validatebox" data-options="required: true,validType:'chinese'" maxlength="8"/>
		     	<b>*</b>
		     </div>
		</div>
		<div class="formitm">
		     <label class="lab">账号：</label>
		     <div class="ipt">
		     	<input type="text" name="bankNo" class="w400 easyui-validatebox" data-options="required: true,validType:'length[16,19]'" maxlength="19" onlynumber="true" />
		     	<b>*</b>
		     </div>
		</div>
		<div class="formitm">
		     <label class="lab">银行：</label>
		     <div class="ipt">
		     	<input type="text" name="bank" class="w400 easyui-validatebox" data-options="required: true" maxlength="20"/>
		     	<b>*</b>
		     </div>
		</div>
		<div class="formitm">
		     <label class="lab">支行：</label>
		     <div class="ipt">
		     	<input type="text" name="branch" class="w400 easyui-validatebox" data-options="required: true" maxlength="20"/>
		     	<b>*</b>
		     </div>
		</div>
		<div class="formitm">
		     <label class="lab">状态：</label>
		     <div class="ipt">
		     	<input type="radio" name="status" value="1" checked="checked"/>&nbsp;&nbsp;禁用
				<input type="radio" name="status" value="2"/>&nbsp;&nbsp;启用
		     </div>
		</div>
		<div class="formitm" id="city">
		     <label class="lab">籍贯：</label>
		     <div class="ipt">
		     	<select class="prov" name="province"></select> 
				<select class="city" name="city" disabled="disabled"></select>
				<select class="dist" name="area" disabled="disabled"></select>
		     </div>
		</div>
	</form>
</div>
<script type="text/javascript">
$(function(){
	$("#city").citySelect({
		url:"${theme_dir}/js/jquery-citySelect/city.json",
		prov:"浙江", //省份 
	    city:"杭州", //城市 
	    dist:"西湖区", //区县 
	    required:true,
	    nodata:"none" //当子集无数据时，隐藏select 
	});
});
</script>